package leetCode;

/**
 * TODO
 *
 * @author 司松坡
 * @createTime 2023年04月05日
 */
public class LeetCode283 {
    public void moveZeroes(int[] nums) {
        int left = 0;
        int mid = 0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] != 0){
                mid = nums[left];
                nums[left] = nums[i];
                nums[i]= mid;
                left ++;
            }
        }
    }
}
